package com.teach.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.teach.entity.Product;
import com.teach.entity.ProductClass;
import com.teach.entity.ShopOrder;
import com.teach.entity.ShopOrderItem;
import com.teach.entity.ShopSlide;


public interface ProductClassMapper {
    int deleteByPrimaryKey(Integer productClassId);

    int insert(ProductClass record);

    int insertSelective(ProductClass record);

    ProductClass selectByPrimaryKey(Integer productClassId);

    int updateByPrimaryKeySelective(ProductClass record);

    int updateByPrimaryKey(ProductClass record);
    
    @Select("select * from product_class order by PRODUCT_CLASS_ID ASC limit 0,9")
    List<ProductClass> findAll();
    
    @Select("select * from shop_slide ")
    List<ShopSlide> slideFindAll();
    
    @Select("select * from product where PRODUCT_CLASS_ID = #{id} and PRODUCT_OUT = 1 order by PRODUCT_ID desc limit 0,12")
    List<Product> pandsFindAll(@Param("id") Integer id);
    
    @Select("select * from shop_order_item order by SHOP_ORDER_ITEM_ID desc ")
    List<ShopOrderItem> orderFindAll();
}